﻿using System;
using System.Collections.Generic;
using System.Text;
using YouHP.Utility;
using YouHP.BLL;
using System.Web;
using YouHP.Model;

namespace YouHP.Pages.Profile
{
    public class CommentList : YouHP.Pages.Profile.ProfileBasePage
    {
        public override void InitPage()
        {
            base.InitPage();
            this.PageKey = PageKeys.Profile_CommentList;
        }

        protected override void ShowPage()
        {
            base.ShowPage();
            if (ErrorCount > 0) return;
            HandleCommon();
            if (ErrorCount > 0) return;
            if (IsPost) HandlePost();
            else
            HandleGet();
        }

        private void HandlePost()
        {
        }

        private void HandleCommon()
        {
            this.AddLocation("留言列表", "/Profile/CommentList.aspx");
            this.SetTitle(this.ProfileData.UserName + "  的留言");
       
            this.AddScriptSrc("/support/Alpha/Js/mootools.js");

            //如果是本人登录此页面，将留言设置为已读
            if (UserData.Id == ProfileData.Id)
            {
                CommentBLL.Instance.UpdateCommentState(ProfileData.Id, 1,0);
            }

        }


        protected void HandleGet()
        {


        }


    }
}
